<?php
/**
 * Created by PhpStorm.
 * User: peter
 * Date: 2018/7/16
 * Time: 下午12:25
 */

namespace app\model;


class ExpressCompany extends Base
{
    protected $pk = 'id';
    // 此处表名请务必设置为public
    public $table = 'express_company';
    /**
     * @purpose 根据条件获取数据条数
     * @param array $where
     * @return int
     */
    public function total(array $where = []): int
    {
        return (int) $this
            ->where($where)
            ->count();
    }
}